<?php 
get_header();
// $lanmuimg=ifan_taxonomy_image_url();
?>
<div class="clear">




</div>

<div class="container">
	<div class="debug">
	
	
	<?php
	$category = get_the_category();
	// var_dump($category);
	$current_id=$category[0]->cat_ID;
	$current_root_id=tx_wp_get_category_root_id($current_id);
	// echo '当前栏目名称:'.$category[0]->cat_name.'<br/>';
	// echo '当前栏目ID:'.$current_id.'<br/>';
	// echo '当前栏目顶级栏目ID:'.$current_root_id.'<br/>';
	// var_dump($current_id);
	// var_dump($current_root_id);
	// var_dump($current_id!=30);
	// var_dump($current_root_id!=30);
	?>

	</div>
	<div class="row breadcrumbs">
        <?php	wheatv_breadcrumbs();?>
    </div>
	<div class="row">
		<h1></h1>
	</div>
	<div class="row">

	<?php
		if($current_root_id==30 ||$current_root_id==31 ) {
			if ( have_posts() ) {

				// Load posts loop.
				while ( have_posts() ) {
					the_post();
					get_template_part( 'template-parts/content/content','product' );
				}

				// Previous/next page navigation.
				echo '<div class="col-lg-12 text-center"><div class="page-num">';
				mo_paging2();
				echo '</div></div>';

			} else {

				// If no content, include the "No posts found" template.
				get_template_part( 'template-parts/content/content', 'none' );

			}
		}else{
	?>
		<div class="col-lg-8 col-md-12 col-sm-12 col-12 sidebar-padding-right">
			<?php
			if ( have_posts() ) {

				// Load posts loop.
				while ( have_posts() ) {
					the_post();
					get_template_part( 'template-parts/content/content' );
				}

				// Previous/next page navigation.
				echo '<div class="col-lg-12 text-center"><div class="page-num">';
				mo_paging2();
				echo '</div></div>';

			} else {

				// If no content, include the "No posts found" template.
				get_template_part( 'template-parts/content/content', 'none' );

			}
			?>

		</div>
		<aside class="col-lg-4 col-md-12 col-sm-12 col-12 sidebar sidebar-left">
			<div id="sidebar">
				
					<?php include_once("sidebar.php"); ?>
			
			</div>
		</aside>
	</div>
	<?php
		}
	?>

	</div>
</div>

<?php
get_footer();
 ?>